#pragma once
#include<iostream>
class ItemType
{
public:
	int key;

public:
	ItemType(int _key=0)
	{
		key=_key;
	}
	void print(std::ostream& out)const
	{
		int j=key;
		std::cout<<"key is"<<key<<std::endl;
	}
	bool lessthen( ItemType& item)const
	{
		if(key<item.key)
			return true;
		else
			return false;
	}
	bool equal(const ItemType& item)const
	{
		if(key==item.key)
			return true;
		else
			return false;
	}
};
class Node
{
public:
	ItemType item;
	Node*next;
	Node()
	{
		item=NULL;
		next=NULL;
	}
	~Node()
	{	
		std::cout<<" destructor"<<std::endl;
	}
	
};

class SortedList
{
public:
	SortedList(void);
	Node*head;

public:
	~SortedList(void);
public:
	void insert(int);
public:
	void del(int);
public:
	int length;
public:
	void printal(void);
};
